* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Microsoft YaHei', sans-serif;
    background-color: #f5f5f5;
    color: #333;
    line-height: 1.6;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

header {
    text-align: center;
    margin-bottom: 30px;
}

header h1 {
    color: #81D8D0;
    font-size: 2.5em;
    margin: 20px 0;
}

.control-panel {
    background-color: white;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    margin-bottom: 30px;
}

.position-select select {
    width: 100%;
    padding: 12px;
    border: 2px solid #81D8D0;
    border-radius: 6px;
    font-size: 16px;
    color: #333;
    background-color: white;
    cursor: pointer;
    transition: all 0.3s ease;
}

.position-select select:hover {
    border-color: #5fb4ac;
}

.file-upload {
    margin-top: 20px;
    text-align: center;
}

.file-upload input[type="file"] {
    width: 100%;
    padding: 10px;
    border: 2px dashed #81D8D0;
    border-radius: 6px;
    cursor: pointer;
}

.upload-hint {
    color: red;
    font-size: 14px;
    margin-top: 10px;
}

.display-panels {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    margin: 20px 0;
}

.question-panel,
.answer-panel {
    flex: 1;
    width: 50%;
    padding: 20px;
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.content {
    min-height: 200px;
    line-height: 1.6;
    white-space: pre-wrap;
    word-wrap: break-word;
}

.question-panel h2, .answer-panel h2 {
    color: #81D8D0;
    margin-bottom: 15px;
    font-size: 1.5em;
}

.content {
    min-height: 200px;
    padding: 15px;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    background-color: #fafafa;
}

.mode-switch {
    display: flex;
    align-items: center;
    margin: 15px 0;
}

.switch {
    position: relative;
    display: inline-block;
    width: 60px;
    height: 34px;
    margin-right: 10px;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: .4s;
    border-radius: 34px;
}

.slider:before {
    position: absolute;
    content: "";
    height: 26px;
    width: 26px;
    left: 4px;
    bottom: 4px;
    background-color: white;
    transition: .4s;
    border-radius: 50%;
}

input:checked + .slider {
    background-color: #81D8D0;
}

input:checked + .slider:before {
    transform: translateX(26px);
}

.mode-label {
    font-size: 16px;
    color: #333;
}

.next-button-container {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
}

.question-count {
    padding: 10px;
    border: 2px solid #81D8D0;
    border-radius: 6px;
    font-size: 16px;
    color: #333;
    background-color: white;
    cursor: pointer;
}

/* 当处于背题模式时隐藏答案面板 */
.answer-panel.hidden {
    display: none;
}

.next-button {
    background-color: #81D8D0;
    color: white;
    border: none;
    padding: 12px 30px;
    border-radius: 6px;
    font-size: 16px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.next-button:hover {
    background-color: #5fb4ac;
}

@media (max-width: 768px) {
    .container {
        padding: 10px;
        width: 100%;
    }
    
    header h1 {
        font-size: 1.8em;
    }

    .control-panel {
        padding: 15px;
    }

    .display-panels {
        flex-direction: column;
        gap: 15px;
    }

    .question-panel,
    .answer-panel {
        width: 100%;
        flex: none;
    }

    .content {
        min-height: 150px;
    }

    .next-button-container {
        flex-direction: column;
        gap: 10px;
    }

    .next-button,
    .question-count {
        width: 100%;
        max-width: 300px;
    }

    .mode-switch {
        justify-content: center;
    }

    .file-upload input[type="file"] {
        padding: 8px;
    }

    .position-select select {
        padding: 10px;
        font-size: 14px;
    }

    .upload-hint {
        font-size: 12px;
    }
}